// ImageProcessing.h

#pragma once
#include <tchar.h>
#include <windows.h>
#include <afxwin.h>


using namespace System;

namespace ImageProcessing {

	public ref class ImageProcess
	{
	public:
		ImageProcess(int width, int height, int stride, byte* imgScan0){};

		~ImageProcess(){delete scan0;};

		enum class AlgorithmEnum
		{
			Gaussian,
			Median
		};
		enum class NoiseEnum
		{
			SaltAndPepper,
		};
		enum class ImageAdjustmentEnum
		{
			BlackWhite,
			Inverse
		};

		void DoAlgorithm(AlgorithmEnum algorithmKind, int amountOfTimes, int size);
		void MakeSomeNoise(NoiseEnum noiseKind, int percentage);
		void AdjustImage(ImageAdjustmentEnum adjustmentKind);

		int GetPercentageUnchangedPixels(int threshold);
		/*int* ReturnImage(){
			return img;
		};*/		
		
	private:
		int imageWidth;
		int imageHeight;
		int imageStride;
		byte* scan0;

		//Algorithms
		void DoGaussianFilter(int size);
		void DoBlackWhite();
		void DoInverse();
		void DoMedianFilter(int size);
		void MakeSaltAndPepperNoise(int percentage);
	};
}
